<?php
namespace catchAdmin\externalGoods\request;

use catcher\base\CatchRequest;

class TenantGoodsCreateRequest extends CatchRequest
{

    protected function rules(): array
    {
        // TODO: Implement rules() method.
        return [
            'goods_name' => 'require',
            'spec'=>'in:1,2',
            'goods_img'=>'require',
            'brand_name'=>'require',
            'origin_name'=>'require',
            'unit_name'=>'require',
            'stock'=>"number",
            'price'=>"float",
        ];
    }

    protected function message()
    {
        // TODO: Implement message() method.
        return [
            'spec'=>'商品规格，只能选择1，2两种方式',
            'goods_img'=>'请上传商品图'
//            'unit_name.unique' => '已存在相同单位名',
//            'unit_name.require'=>"单位名不能为空"
        ];
    }
}